package org.example.webserver.dao;

import org.example.webserver.pojo.Commodity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

@Repository
public interface CommodityDao extends JpaRepository<Commodity,Long> {
    List<Commodity> findAll();
    List<Commodity> findByNameLike(String name);
    List<Commodity> findByMerchant(String merchant);
    Commodity findCommodityById(Long id);
    void deleteById(Long id);
}
